import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'Home',
      component: () => import('@/views/HomeView.vue'),
      redirect: 'featured',
      children: [
        {
          path: 'featured',
          name: 'Featured',
          component: () => import('@/views/FeaturedView.vue'),
        },
      ],
    },
    {
      path: '/podcast ', // 播客
      name: 'Podcast',
      component: () => import('@/views/PodcastView.vue'),
    },
    {
      path: '/trends ', // 动态
      name: 'trends',
      component: () => import('@/views/TrendsView.vue'),
    },
  ],
})

export default router
